home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
assemblr
/
library
/
tasmswan
/
cflags.c
< prev
next >
Wrap
Text File
|
1989-07-17
|
558b
|
34 lines
/******************************************************************
cflags.c
displays flags
NOTE: you must use the TCC comand-line compiler for this.
See book.
********/
#pragma inline
#include <stdio.h>
void showflags();
main()
{
showflags();
}
void showflags()
{
unsigned int theflags;
printf("- - - - O D I T S Z - A - P - C\n");
asm pushf
asm pop [theflags]
asm mov cx,16
Again:
asm rol [Word ptr theflags],1
asm push cx
printf("%d ", (theflags & 1));
asm pop cx
asm loop Again
printf("\n");
}